<template>
  <div>
    <ul v-if="clist.length">
      <li class="listBox" v-for="item in clist" :key="item.cinemaId">
        <router-link :to="'/cinemas/'+item.cinemaId">
          <!-- {{item.name}} {{item.address}} -->
          <ul>
            <li class="left">
              <div class="line11">{{item.name}}</div>
              <div class="line22">{{item.address}}</div>
            </li>
            <li class="right">
              <div class="line33">￥{{item.lowPrice/100}}元</div>
              <div class="line44">距离未知</div>
            </li>
          </ul>
        </router-link>
      </li>
    </ul>
  </div>
</template>

<style lang="scss">
.listBox {
  box-sizing: border-box;
  height: 1.5rem;
  padding: 0.3rem;
}

.left {
  width: 5.6rem;
  box-sizing: border-box;
  padding-right: 0.3rem;
  float:left;

  .line11 {
    height: 0.44rem;
  }
  .line22 {
    width: 4.24rem;
    height: 0.36rem;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    color: #797d82;
    font-size: 0.24rem;
  }
}

.right{
    float:left;
    width: 1.3rem;
    .line33{
        height:0.44rem;
        text-align: center;
        color:#ff5f16;
    }
    .line44{
    height: 0.36rem;
    text-align: center;

    }

}
</style>

<script>
import { getDetail } from "@/api/cinema.js";

export default {
  data() {
    return {
      clist: []
    };
  },
  methods: {
    getCList() {
      getDetail().then(res => {
        this.clist = res.data.cinemas;
      });
    }
  },
  created() {
    this.getCList();
  }
};
</script>


<style lang="scss">
li {
  font-size: 0.3rem;
  a {
    color: black;
  }
}
</style>
